module.exports = function($scope, $stateParams, $state, $modal, $modalInstance,FileUploader,$resource,toaster,items){  
      
     console.log(items);
     console.log('上面是items')
     var paras = {
            expert_code:items.expert_code,
            project_code:items.project_code    
        };
     $resource('/api/as/ggc/reviewexpertset/getExpertUpdateInfo', {}, {}).
        save(paras,function(res) {
            console.log(paras);
            if (res.errcode !== 0) {
                toaster.error({title:"",body:res.errmsg});
                return;
            }
            console.log(res);
            console.log('上面是回显res')
            $scope.a = res.data;
            $scope.bigTotalItems = res.data.totalRecord;      
        })
         $scope.save = function () {
        var para = {       
            expert_code:items.expert_code,
            project_code:items.project_code,  
            score:$scope.a.score, 
            review_opinion:$scope.a.review_opinion        
        };
        // para = angular.extend($scope.parameters, para);
        $resource('/api/ac/ggc/reviewProExpertService/updateExpert', {}, {}).
        save(para,function(res) {
            console.log(para);
            if (res.errcode !== 0) {
                toaster.error({title:"",body:res.errmsg});
                return;
            }
            console.log(para);
            console.log(res);
            // $scope.objs = res.data.results;
            // $scope.bigTotalItems = res.data.totalRecord;      
            $modalInstance.close();
        })
    };

    $scope.submit = function () {
        var para = {
            expert_code:items.expert_code,
            project_code:items.project_code,
            score:$scope.a.score, 
            review_opinion:$scope.a.review_opinion        
        };
        // para = angular.extend($scope.parameters, para);
        $resource('/api/as/ggc/reviewrecommendcity/updateState', {}, {}).
        save(para,function(res) {
            console.log(para);
            if (res.errcode !== 0) {
                toaster.error({title:"",body:res.errmsg});
                return;
            }
            console.log(para);
            console.log(res); 
            $modalInstance.close();
        })
    };
    $scope.cancel = function () {
        $modalInstance.close();
    };

};